package com.search.entity;


import java.util.Objects;

public class SearchContentEntity {
    private String title; //标题
    private String url; //链接
    private String content; //内容
    private String time; //时间
    private String source; //来源
    private String author; //作者
    private  String uniqueKey; //唯一标识 用于去重



    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getUniqueKey() {
        return uniqueKey;
    }

    public void setUniqueKey(String uniqueKey) {
        this.uniqueKey = uniqueKey;
    }

    @Override
    public String toString() {
        return "SearchContentEntity{" +
                "title='" + title + '\'' +
                ", url='" + url + '\'' +
                ", content='" + content + '\'' +
                ", time='" + time + '\'' +
                ", source='" + source + '\'' +
                ", author='" + author + '\'' +
                ", uniqueKey='" + uniqueKey + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        SearchContentEntity that = (SearchContentEntity) o;
        return Objects.equals(title, that.title) && Objects.equals(url, that.url) && Objects.equals(content, that.content) && Objects.equals(time, that.time) && Objects.equals(source, that.source) && Objects.equals(author, that.author) && Objects.equals(uniqueKey, that.uniqueKey);
    }

    @Override
    public int hashCode() {
        return Objects.hash(title, url, content, time, source, author, uniqueKey);
    }
}
